package com.beta.DB;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class Bank_information extends SQLiteOpenHelper{
	private static final int DATABASE_VERSION = 1;
	private static final String DATABASE_NAME = "Bank_Information";
	private static final String TABLE_NAME = "bank";
	private static final String CREATE_REPLAYS_TABLE = "CREATE TABLE bank_info(_id INTEGER PRIMARY KEY AUTOINCREMENT,ID INTEGER,Bank TEXT)";
	private SQLiteDatabase db_bank;

	public Bank_information(Context context){
		super(context,DATABASE_NAME,null,DATABASE_VERSION);

	}

	@Override
	public void onCreate(SQLiteDatabase db_bank){
		this.db_bank = db_bank;
		db_bank.execSQL(CREATE_REPLAYS_TABLE);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db_bank,int oldVersion,int newVersion){
		// TODO Auto-generated method stub

	}
	public void saveData_bank(SQLiteDatabase db_bank,String bank_name,int ID){
		ContentValues cv = new ContentValues();
		cv.put("bank_name",bank_name);
		cv.put("ID",ID);
		this.insert(cv);
	}
	public void insert(ContentValues cv){
		SQLiteDatabase db_bank = getWritableDatabase();
		db_bank.insert(TABLE_NAME,null,cv);
		db_bank.close();
	}

	
}
